<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>日期</title>
</head>
<body>
<script>

document.write(Date()+"<br>")

var d=new Date();
document.write("从 1970/01/01 至今已过去 " + d.getTime() + " 毫秒"+"<br>");

var dd = new Date()
dd.setFullYear(1992,10,3)
document.write(dd+"<br>")

var ddd = new Date()
document.write (ddd.toUTCString()+"<br>")

var d1=new Date()
var weekday=new Array(7)
weekday[0]="星期日"
weekday[1]="星期一"
weekday[2]="星期二"
weekday[3]="星期三"
weekday[4]="星期四"
weekday[5]="星期五"
weekday[6]="星期六"

document.write("今天是" + weekday[d1.getDay()])
</script>
</body>
</html>